/*
MySQL Backup
Database: wuziqi
Backup Time: 2024-12-08 16:33:00
*/

SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `wuziqi`.`discuss`;
DROP TABLE IF EXISTS `wuziqi`.`discuss_body`;
DROP TABLE IF EXISTS `wuziqi`.`history`;
DROP TABLE IF EXISTS `wuziqi`.`notice`;
DROP TABLE IF EXISTS `wuziqi`.`question`;
DROP TABLE IF EXISTS `wuziqi`.`user`;
CREATE TABLE `discuss` (
  `discuss_id` bigint NOT NULL,
  `user_id` bigint DEFAULT NULL,
  `content` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  PRIMARY KEY (`discuss_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `discuss_body` (
  `discuss_body_id` bigint NOT NULL,
  `user_id` bigint DEFAULT NULL,
  `discuss_id` bigint DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `content` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`discuss_body_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `history` (
  `history_id` bigint NOT NULL,
  `user_id` bigint DEFAULT NULL,
  `result` int DEFAULT NULL,
  `reason` int DEFAULT NULL,
  `row_1` int DEFAULT NULL,
  `row_2` int DEFAULT NULL,
  `row_3` int DEFAULT NULL,
  `row_4` int DEFAULT NULL,
  `row_5` int DEFAULT NULL,
  `row_6` int DEFAULT NULL,
  `row_7` int DEFAULT NULL,
  `row_8` int DEFAULT NULL,
  `row_9` int DEFAULT NULL,
  `row_10` int DEFAULT NULL,
  `row_11` int DEFAULT NULL,
  `row_12` int DEFAULT NULL,
  `row_13` int DEFAULT NULL,
  `row_14` int DEFAULT NULL,
  `row_15` int DEFAULT NULL,
  PRIMARY KEY (`history_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `notice` (
  `notice_id` bigint NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `content` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `user_id` bigint NOT NULL,
  PRIMARY KEY (`notice_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `question` (
  `question_id` bigint NOT NULL,
  `content` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `user_id` bigint DEFAULT NULL,
  `answer` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `user` (
  `user_id` bigint NOT NULL,
  `username` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `nickname` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `tot_game_num` int unsigned DEFAULT NULL,
  `win_game_num` int unsigned DEFAULT NULL,
  `identity` int DEFAULT '0',
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
BEGIN;
LOCK TABLES `wuziqi`.`discuss` WRITE;
DELETE FROM `wuziqi`.`discuss`;
INSERT INTO `wuziqi`.`discuss` (`discuss_id`,`user_id`,`content`,`time`) VALUES (1733645900595, 1733645342881, '五子棋的馒头阵uu们有什么破解的方法嘛', '2024-12-08 08:18:21');
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `wuziqi`.`discuss_body` WRITE;
DELETE FROM `wuziqi`.`discuss_body`;
INSERT INTO `wuziqi`.`discuss_body` (`discuss_body_id`,`user_id`,`discuss_id`,`time`,`content`) VALUES (1733645912039, 1733645342881, 1733645900595, '2024-12-08 08:18:32', '在线蹲'),(1733645973013, 1733645470485, 1733645900595, '2024-12-08 08:19:33', '把捣乱的给我叉出去');
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `wuziqi`.`history` WRITE;
DELETE FROM `wuziqi`.`history`;
INSERT INTO `wuziqi`.`history` (`history_id`,`user_id`,`result`,`reason`,`row_1`,`row_2`,`row_3`,`row_4`,`row_5`,`row_6`,`row_7`,`row_8`,`row_9`,`row_10`,`row_11`,`row_12`,`row_13`,`row_14`,`row_15`) VALUES (1733646103372, 1733645342881, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),(1733646103378, 1733645470485, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),(1733646135765, 1733645342881, 0, 0, 0, 0, 0, 0, 0, 127930176, 2097152, 2097152, 2097152, 2097152, 3145728, 0, 0, 0, 536887296),(1733646135769, 1733645470485, 1, 0, 0, 0, 0, 0, 0, 127930176, 2097152, 2097152, 2097152, 2097152, 3145728, 0, 0, 0, 536887296);
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `wuziqi`.`notice` WRITE;
DELETE FROM `wuziqi`.`notice`;
INSERT INTO `wuziqi`.`notice` (`notice_id`,`title`,`content`,`update_time`,`user_id`) VALUES (1733645561149, '测试公告标题', '测试公告内容', '2024-12-08 08:12:41', 1733645470485),(1733645659862, '关于公告栏、讨论版、Q&A每页显示条数的说明', '公告栏、讨论版、Q&A每页显示条数均为10条', '2024-12-08 08:14:20', 1733645417692),(1733645758039, '关于部分浏览器显示页面布局异常的说明', '如果浏览器内核版本较低，可能出现浏览器显示页面布局异常，建议升级浏览器', '2024-12-08 08:15:58', 1733645448487);
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `wuziqi`.`question` WRITE;
DELETE FROM `wuziqi`.`question`;
INSERT INTO `wuziqi`.`question` (`question_id`,`content`,`user_id`,`answer`) VALUES (1733645931046, '这个网页是什么', 1733645342881, '这个网页是五子棋呀');
UNLOCK TABLES;
COMMIT;
BEGIN;
LOCK TABLES `wuziqi`.`user` WRITE;
DELETE FROM `wuziqi`.`user`;
INSERT INTO `wuziqi`.`user` (`user_id`,`username`,`password`,`nickname`,`tot_game_num`,`win_game_num`,`identity`) VALUES (1733645342881, 'webtest0', '$2a$10$XprIRiaxTgWOhm/Zw/yFQOKcfb20IVh/ZFq/6MRDc6KYqw3n5bWam', '测试用户0', 2, 0, 0),(1733645417692, 'webtest1', '$2a$10$VnuSpPz8Di4Ul1iZlqy93.9TijdGC.Otx7z.lvixtU/4t8bdLSbCG', '测试用户1', 0, 0, 1),(1733645448487, 'webtest2', '$2a$10$FMWTlpcMiipQ19/GUv0t6O7cVSHYQ2BAtuumCJwSXMCAXBiZ0Mgqe', '测试用户2', 0, 0, 2),(1733645470485, 'webtest3', '$2a$10$Df4/2HpE9mDiJOoGGgusq.VYMbs3VGC5U9CK229ow0ByfpIGB/bWO', '测试用户3', 2, 2, 3);
UNLOCK TABLES;
COMMIT;
